package com.ruoyi.system.api;

import com.ruoyi.common.core.constant.SecurityConstants;
import com.ruoyi.common.core.constant.ServiceNameConstants;
import com.ruoyi.common.core.web.domain.AjaxResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;

import java.io.InputStream;

@FeignClient(contextId = "remoteOssService",value = ServiceNameConstants.OSS_SERVICE)
public interface RemoteOssService {

    @PostMapping(value="/upText")
    public AjaxResult upText(@RequestBody String s,@RequestParam("sub") String sub,@RequestHeader(SecurityConstants.FROM_SOURCE)String sourc);

    @PostMapping("/upFile")
    public AjaxResult upFile(@RequestParam(value = "img") String img, @RequestParam(value="fileName",required = false)String fileName,  @RequestHeader(SecurityConstants.FROM_SOURCE)String source);


    @GetMapping("/downLoad")
    public AjaxResult downLoad(@RequestParam("path")String path,@RequestParam("fileName")String fileName,  @RequestHeader(SecurityConstants.FROM_SOURCE)String sourc);


    @GetMapping("/getVideo")
    public AjaxResult getVideo(@RequestParam("videoId")String videoId,@RequestHeader(SecurityConstants.FROM_SOURCE)String sourc);
}
